<?php
class Zendvn_View_Helper_CmsIconButton extends Zend_View_Helper_Abstract{
	
	public function cmsIconButton($title = '', $imgLink, $link = null, $attribs = array()){
		$strAttribs = '';
		if(count($attribs)>0){
			foreach ($attribs as $keyAttribs => $valueAttribs){
				$strAttribs .= $keyAttribs . '="' . $valueAttribs . '" ';
			}
		}
		if($link == null)
		{
			$xhtml = '<img src="' . $imgLink . '" title="' . $title . '">';
		}else{
			$xhtml = '<a href="' . $link . '" class="icon_control" ' . $strAttribs . '><img src="' . $imgLink . '" title="' . $title . '"></a>';
		}
		return $xhtml;
	}
}